-
Notifications
You must be signed in to change notification settings - Fork 962
Use KvikIO's implementation of file-backed memory mapping #19164
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
kingcrimsontianyu
wants to merge
11
commits into
rapidsai:branch-25.10
Choose a base branch
from
kingcrimsontianyu:use-kvikio-mmap
base: branch-25.10
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Use KvikIO's implementation of file-backed memory mapping #19164
kingcrimsontianyu
wants to merge
11
commits into
rapidsai:branch-25.10
from
kingcrimsontianyu:use-kvikio-mmap
+31
−120
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
/ok to test 51ee3b2 |
/ok to test |
@kingcrimsontianyu, there was an error processing your request: See the following link for more information: https://docs.gha-runners.nvidia.com/cpr/e/1/ |
/ok to test bccb387 |
rapids-bot bot
pushed a commit
to rapidsai/kvikio
that referenced
this pull request
Jul 25, 2025
cuDF PR rapidsai/cudf#19164 currently has 4 failed unit tests when `LIBCUDF_MMAP_ENABLED=ON`: ``` 28 - CSV_TEST (Failed) 29 - ORC_TEST (Failed) 32 - JSON_TEST (Failed) 40 - DATA_CHUNK_SOURCE_TEST (Failed) ``` The fix entails code changes on both the KvikIO and cuDF sides. On the KvikIO side, the `MmapHandle::read()` and `MmapHandle::pread()` methods need to: - Allow the read size to be 0 - Allow `offset` to be equal to `initial_map_offset` (when the read size is 0) This PR makes this change. In addition, this PR adds more detailed error messages when out-of-range exception occurs. Authors: - Tianyu Liu (https://github.com/kingcrimsontianyu) Approvers: - Mads R. B. Kristensen (https://github.com/madsbk) URL: #781
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
improvement
Improvement / enhancement to an existing function
libcudf
Affects libcudf (C++/CUDA) code.
non-breaking
Non-breaking change
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Background
Libcudf 25.04 and earlier use
memory_mapped_source
by default. For host read it uses memory mmaped I/O, and for device read it uses standard I/O.Libcudf 25.06 uses standard I/O by default. For host read,
memory_mapped_source
still uses memory mmaped I/O, while the device read is no longer allowed (runtime exception if used). Parquet/ORC readers fall back to the host read + H2D copy to emulate device read for the mapped source.This PR
Now that the file-backed memory mapping (C++) is supported by KvikIO (rapidsai/kvikio#740), this PR updates libcudf to reinvigorate
memory_mapped_source
using KvikIO's implementation. This re-enables device read and brings performance improvement (e.g. through parallel prefault).Notes
memory_mapped_source
is an implementation detail indatasource.cpp
. Currently testing was conducted on C2C (arm) and PCIe (x86) systems by manually settingLIBCUDF_MMAP_ENABLED=ON
and running the tests. Refer to rapidsai/kvikio#530 (comment) for benchmark results.Dependency
This PR depends on KvikIO PR rapidsai/kvikio#781 to fix unit test errors.
Checklist